package xcmg.syn.infra;

/**
 * Created by huaxiulin on 2017/4/11.
 */
public enum ErrorCode
{
    Success(0,"操作成功"),
    Failure(1,"操作失败"),
    NeedLogin(2,"用户没有登录"),
    UnExceptedError(3,"未知的错误发生"),
    IllegalArument(4,"参数错误"),
    SQLIntegrityConstraintViolation(5,"违反完整性约束"),
    NoAuthorization(6,"没有权限执行此操作"),
    CheckLoginFailure(7,"用户不存在或者密码错误"),
    UserNameExists(8,"登录名称已存在"),
    RoleNameExists(9,"角色名已存在"),
    RoleIsUsed(10,"角色已经被使用"),
    UserLocked(11,"用户被锁定"),
    OldPwdNotRight(12,"原密码不正确"),
    NewPwdNotMatchConfirmPwd(13,"新密码与确认密码不一致"),
    SqlSyntaxError(14,"数据库执行异常"),
    ShelvesNumber(15,"货架编号重复"),
    ZxRequestNotSupport(16,"请切换pda公司版本"),

    /**----------------------------------------------------------------
     * 线以上内容请不要修改
     * ----------------------------------------------------------------**/
     YourErrorCodeGoesHere(1000,"你的失败码请在后面定义"),
    ImportExcelEndWithXLS(10001,"请导入以.xls结尾的excel文件"),
    ImportExcelError(10002,"导入模板不正确"),
    ImportExcelNoData(10003,"无有效数据"),
    VersionExists(10004,"版本号已存在"),
    ImportExcelEndWithAPK(10005,"请导入以.apk结尾的安装包文件"),
    VersionLow(10006,"版本号过低，必须大于当前最新版本号"),
    /**----------------------------------------------------------------
     * 零件管理
     * ----------------------------------------------------------------**/
    MaterialsIsExists(2000,"零件已存在"),
    MaterialsInsertFail(2001,"新增零件失败"),
    MaterialsNotExists(2002,"零件不存在"),
    MaterialsNoIsNull(2003,"零件编号不能为空"),
    MaterialsUpdateFail(2004,"修改零件信息失败"),
    MaterialsNoIsExists(2005,"零件编码已存在"),
    MaterialsIsRepeat(2006,"零件存在重复数据"),
    MaterialsIsClassCode(2007,"分类编码已存在"),
    MaterialsNoTooLong(2008,"零件编号输入过长"),
    MaterialsNotExistsOrError(2009,"零件不存在或输入有误"),
    MaterialsTypeTooLong(2010,"零件分类名称输入过长"),
    MaterialsLocalDesError(2011,"零件英文描述保存失败"),
    MaterialsSyncEnDesError(2012,"零件英文描述同步中，稍后查看"),
    MaterialsTransError(2013,"零件英文描述翻译错误"),


    /**----------------------------------------------------------------
     * 数据字典
     * ----------------------------------------------------------------**/
    DataDictionaryIsExists(3000,"数据字典已存在"),
    DataDictionaryCantRemove(3001,"所选分类下存在子分类，不允许删除"),
    PurchaseDataDictionaryIsExists(3002,"采购方式编码已存在"),
    SendDataDictionaryIsExists(3003,"发货方式编码已存在"),

    /**
     *  单据错误码4000-4999，采购申请 4000-4099
     *
     */
    PurchaseBillIdNotExists(4000,"采购单号不存在"),
    PurchaseInfoNotExists(4001,"采购信息不存在"),
    PurchaseStatusNotUpdate(4002,"该采购单据不可编辑"),
    PurchaseStatusNotAudit(4003,"该采购单据不可审核"),
    PurchaseImportNotData(4004,"导入模版为空或者模版不正确"),
    PurchaseSaleExists(4005,"该采购单已创建直投单，不能删除"),
    PurchaseInboundExists(4006,"该采购单已创建入库单，不能整单删除"),
    PurchaseSaleIntentionExists(4007,"该采购单已创建销售订单，不能删除"),
    UnreviewedNotAllowingAdjust(4008,"未审核通过不允许调整"),
    SALE_INTENTION_CREATE_LOCK_ERROR(4009,"手速太快了~"),

    DeliveryReceiptBillIdNotExists(40100,"发运交接单号不存在"),
    DeliveryReceiptInfoNotExists(40101,"发运交接信息不存在"),
    DeliveryReceiptCommited(40102,"该发运交接单已发货"),
    DeliveryReceiptNDeliveryNote(40102,"该发运交接单无发货通知单信息"),
    DeliveryLogisticsBasicDataNote(40103,"同一个承运商下，出发目的城市没有保持唯一性"),
    DeliveryReceiptNotShiped(40104,"尚未生成发运交接单或发运交接单未发货"),
    DeliveryReceiptNotAllBoxUp(40105,"该发运交接单下已出库条码未全部装箱"),
    AddressIsUnlikeness(40106,"地址未统一"),
    DeliveryReceiptNotExistBoxUp(40105,"该发运交接单无装箱信息或未出库"),
    DeliveryReceiptNotExistExpressInfo(40106,"暂无物流信息"),
    SyncPackInfoError(40107,"未找到需要同步的装箱信息"),
    BoxupMainDeliveryDone(40108,"该装箱单已发货"),
    BoxupMainNotExist(40109,"该装箱单不存在"),

    /**
     *  仓库管理 5000-5999
     */
    WarehouseDuplicated(5000,"仓库编号重复"),
    WarehouseAreaDuplicated(5001,"库区编号重复"),
    WarehouseNotFound(5002,"没有找到相关零件"),
    WarehouseAmountNotEqual(5003,"零件数量不符合"),
    WarehouseIdError(5004,"没有找到相关记录"),
    WarehouseGenDeliveryRecordError(5005, "生成出库记录时失败"),
    AbnormalDetailNotFound(5006, "未找到非正常入库详情记录"),
    AbnormalDetailArgumentError(5007, "参数不正确"),
    WarehouseInboundDuplicate(5008, "不能重复扫描入库"),
    WarehouseOutboundDuplicate(5009, "不能重复扫描出库"),
    WarehouseBarcodeNotFound(5010, "条码不存在"),
    WarehouseLocationCodeError(5011, "储位编码错误"),
    WarehouseFrozen(5012,"零件已冻结"),
    AbnormalInDeleteError(5013,"只能删除未入库状态的入库单"),
    RegionAllotDeleteError(5014,"只能删除未完成状态的调拨单"),
    AbnormalInUpdateError(5015, "入库数量不能小于已打印数量"),
    InboundNumError(5016, "实际入库数量不能大于计划入库数量"),
    LocationCodeError(5017, "储位错误"),
    LocationBeginRowNoError(5018,"起止排编号必须大于0"),
    OutboundNumError(5019, "实际出库数量不能大于计划出库数量"),
    LocationFloorNumError(5020,"层数目和列数目必须大于0"),
    LocationEndRowNoError(5021,"结束排编号不能小于开始排编号"),
    TotalBarcodeNotEable(5022, "总条码批量入库功能尚未实现"),
    AbnormalOutDeleteError(5023,"只能删除未出库状态的出库单"),
    AgentUpdateError(5024,"只能更新未审核或调出驳回的调拨单"),
    PurchaseInboundQtyError(5025,"入库数量不能大于剩余数量"),
    MaterialsIsNull(5026,"零件不可为空"),
    MaterialsNumError(5027,"申请数量不正确"),
    SaleReverseRemoveError(5028,"只能删除未审核状态的冲销入库单"),
	AbnormalInNotFound(5030,"单据号为空"),
    BarcodeSplitError(5031,"该条码已拆分"),
    MustBeNewLocation(5032,"必须选择新的储位！"),
    InboundDuplicate(5033,"该单据已入库"),
    OutboundDuplicate(5034,"该单据已出库"),
    ShelfNoDuplicate(5035,"货架编码已存在"),
    earliestInventoryError(5036,"该零件存在更早的库存条码"),
    splitNotExist(5037,"拆件单号不存在"),
    BarcodeWarehouseDoesNotAllowBarcodeStorage(5038,"条码化仓库不允许非条码入库!"),
    NonBarcodedWarehousesNotAllowBarCodeEntry(5039,"非条码化仓库不允许条码入库!"),
    BarcodeWarehouseDoesNotAllowBarcodeOutbound(5040,"条码化仓库不允许非条码出库!"),
    NonBarcodedOutboundNotAllowBarCodeEntry(5041,"非条码化仓库不允许条码出库!"),
    LocationExistsStockNotAllowReduce(5042,"该货架编码已存在且货架有库存，重新定义货架的“排层列位”均需要大于原先的货架信息!"),
    UnsalabelQtyError(5043,"滞销数量不能大于库存数量"),
    SluggishEditError(5044,"不能编辑非本企业的呆滞零件"),
    PdaOutboundLockError(5045,"条码处理中，请稍后再试"),
    PdaInboundLockError(5046,"手速太快了,休息一下吧~"),
    NoBarcodeOutboundLockError(5047,"出库处理中，请稍后再试"),
    NoBarcodeInboundLockError(5048,"入库处理中，请稍后再试"),
    

    /**
     *  企业信息管理 6000-6999
     */
    CompanyNameDuplicated(6000,"企业名称已存在"),
    CompanyOrgIdDuplicated(6001,"企业编号错误"),
    WorkSpaceAddFail(6000+2,"企业工作空间创建失败"),
    CompanyDeleteFail(6000+3,"企业删除失败"),
    InvitationCodeFail(6000+4,"企业注册邀请码无效"),
    CompanyExist(6000+6,"企业已经存在"),
    DisableInvitationCodeFail(6000+7,"邀请码状态更新失败"),
    RelationCompanyFail(6000+8,"企业上下游关系更新失败"),
    RequestIdError(6000+9,"数据库执行异常"),
    AuthTemplateChangeFail(6000+10,"企业权限模板变更失败"),
    CompanyUpdateFail(6000+11,"企业修改失败"),
    CompanyAuditNotYet(6000+12,"审核中"),
    CompanyAuditFail(6000+13,"审核失败"),
    CompanyAuditPass(6000+14,"审核通过"),
    CompanyApplyError(6000+15,"注册申请提交失败"),
    RelationSupplierCompanyFail(6000+16,"添加供应商关系步骤异常"),
    ClassNameDuplicated(6000+16,"分类名称已存在"),
    DealerCodeDuplicated(6000+17,"业务伙伴编号已存在"),
    SupplierCompanyRepeat(6000+18,"该供应商已绑定"),
    CannotBoundSelf(6000+19,"不可以绑定自身为供应商！"),
    ClassIsUsed(6000+20,"客户分类被使用！"),
    SAPCodeDuplicated(6000+21,"SAP代码已被使用！"),
    SAPDisable(6000+22,"当前企业不可调用SAP接口"),
    DealerNameDuplicated(6000+23,"业务伙伴名称已存在"),
    LevelNameDuplicated(6000+24,"分级名称已存在"),
    PrimaryKeyGenerationFailed(6000+25,"主键生成失败，请重新添加"),
    VehicleInfoPresence(6000+26,"客户名下车辆信息已存在"),
    DealerInfoNotExist(6000+27,"客户信息不存在"),
    DealerCompanyRepeat(6000+29,"该客户已绑定"),

    /**
     *  发货通知管理 7000-7999
     * */

    DeliveryNoteIdDuplicated(7001,"发货通知单号错误"),
    DeliveryNoteQtyError(7002,"本次发货数量不能大于剩余数量"),
    DeliveryNoteStateError(7003,"发货通知单状态必须要已出库"),
    DeliveryNoteUpdateError(7004,"发货通知单不可调整"),
    DeliveryNoteSapPostError(7005,"审核成功但过账SAP失败"),
    PartMaterialsNotNumber(7006,"部分零件库存不足"),
    CashShortAndOverIllege(7007,"提交尾差金额超过销售订单尾差金额"),

    /**
     *  发货通知单详情管理 8000-8999
     * */

    DeliveryNoteDeatailIdDuplicated(8001,"发货通知单详情单号错误"),
    DeliveryNoteDetailQty(8002,"本次发货数不正确,请重新填写"),
    DeliveryNoteDetailQtyDesc(8003,"请填写本次发货数量"),
    DeliveryNoteQty(8004,"本次发货数量大于剩余数量,操作失败"),
    /**

     非正常出库管理   9000-9999
     */
    AbnormalOut(9000,"非正常出库单号错误"),
    NumberError(9001,"实际出库数量大于出库数量"),


    /**

     条码管理   10000-10099
     */
    BarcodeNotFound(10000,"条码不存在"),
    BarcodeNotSplit(10001,"条码不可拆分"),
    BarcodeTotalQtyNull(10002,"参数错误：总数量为空"),
    BarcodeLeftNotError(10003,"剩余可打印数量不足"),
    BarcodeTotalQtyError(10004,"参数错误：总数量为0"),
    /**
     策略管理   10100-10199
     */
    AcivityNotFound(10100,"价格方案不存在"),
    AcivityNameDuplicated(10101,"价格方案名称已存在"),
    AcivityDisabled(10102,"价格方案已禁用"),
    AcivityPriceGroupDuplicated(10103,"价格组已存在"),

    /**
     *  领料单 10800-10899
     * */

    MaterialsSchedule(10800,"领料单不存在"),
    MaterialsScheduleNotUpDate(10800,"该领料单不可修改"),
    /**
     *
     * 三包采购申请   11000-11999
     *
     * */
    ThreePurchaseNo(11000,"三包单号不存在"),
    ThreePurchaseId(11001,"三包信息不存在"),
    ThreePurchaseNotUpdate(11002,"该三包采购不可编辑"),
    ThreePurchaseNotAudit(11003,"该三包采购不可审核"),
    ThreePurchaseDeleteError(11004,"只能删除未建三包出库单的三包采购单"),
    InstructionCodeExist(11005, "指令单已存在"),

    /**
     *
     * 三包出库   12000-12999
     *
     * */
    ThreeGuaranteesOut(12000,"三包出库单号不存在"),
    ThreeOutQtyError(12001,"出库数量不能大于剩余数量"),
    ThreeOutDeliveryQtyError(12002,"出库数量不能小于实际出库数量"),
    ThreeOutDeleteError(12003,"只能删除未出库的三包出库单"),
    ThreeOutDetailError(12004,"零件出库数量错误"),
    /**
     * 退货申请  13000
     */
    SalesReturnAddFail(13000+1,"退货申请信息添加失败！"),
    SalesReturnDetailAddFail(13000+2,"退货申请细则添加失败！"),
    UpdateIntentionReturnFail(13000+3,"退货申请-修改销售意向单异常！"),
    UpdateDeliveryReturnFail(13000+4,"退货申请-修改发货通知单异常！"),
    StatusIsIn(13000+5,"只能删除未入库状态的入库单！"),
    SalesIsApplyReturn(13000+6,"销售单已经申请退货！"),
    SalesReturnApplyIsNull(13000+7,"退货申请单不存在！"),
    CannotRemoveAudited(13000+8,"已审核数据无法删除！"),
    SalesIsReturn(13000+9,"销售单已经退货！"),
    ReturnBillIsIn(13000+10,"退货单已入库！"),
    ReturnBillIsNull(13000+11,"退货单不存在！"),
    SalesBillIsNull(13000+12,"销售意向单不存在！"),
    SalesBillIsSave(13000+13,"销售意向单没有提交！"),
    CannotEditAudited(13000+14,"已审核数据无法编辑！"),
    SaleBillNotOut(13000+15,"发货通知单未开始，不可以退货申请！"),
    SubmittingTheOutboundStatusNotAllowedDelete(13000+16,"提交，出库状态不允许删除"),

    /**
     * 盘点单  14000
     */
    CheckStatusIsFail(14000+1,"盘点单当前状态不允许该操作！"),
    CannotRemoveBeginBill(14000+2,"已经启动后的盘点单不允许删除！"),
    CannotDuplicate(14000+3,"该条码已盘点"),

    /**
     * 区域调拨  15000
     *
     */
    RegionAllotDeleteDisable(15000+1,"出库已完成，不允许修改调拨数量"),
    RegionAllotAmountError(15000+2,"调拨数量不能小于已出库数量"),
    AgentDeleteError(15000+3,"该调拨单状态不可删除"),
    MaterialsLocationDifferent(15000 + 4, "不同储位的零件不可以批量转移"),
    RegionAllotNotAudit(15000 + 5, "该区域调拨单不可审核"),
    RegionAllotPlan(15000 + 6, "该区域调拨计划单当前状态不允许修改"),
    RegionAllotPlanCantnotEnd(15000 + 7, "该区域调拨计划单不允许结单"),
    RegionAllotPlanCantnotDel(15000 + 8, "该区域调拨计划单不允许删除"),

    /**
     * 期初入库 16000
     */
    ImportTemplateError(16000+1,"导入错误，模板不正确！"),
    ImportDataError(16000+2,"导入错误，数据不正确！"),
    InsertBillFail(16000+3,"添加入库单错误！"),
    InsertNullData(16000+4,"导入零件信息不可为空！"),
    InitialInventoryNotExist(16000+5,"期初入库单不存在"),
    InitialInventoryInboundStatusError(16000+6,"已入库单据不允许进行入库操作"),
    NeedInboundInitialInventoryDetailNotExisted(16000+7,"单据不存在需要入库的零件"),
    InitialInventoryNoInArea(16000+8,"期初入库单未指定库区，无法自动入库"),

    /**
     * 采购入库 17000
     */
    PurchaseInboundAmountError(17000+1,"计划入库数量不能小于实际入库数量"),
    PurchaseInboundDeleteError(17000+2,"只能删除未入库状态的采购入库单"),
    /**
     * sap 18000
     */
    SapReturnNull(18000+1,"SAP无返回值"),
    SapUpdateFail(18000+2,"更新sap内部订单号失败"),
    SapFail(18000+3,"sap接口调用失败，请稍后再试"),
    OrgError(18000+4,"用户企业编号及名称不能为空"),
    CustomerError(18000+5,"客户编号及名称不能为空"),
    DeliveryError(18000+6,"发运方式不能为空"),
    SettleError(18000+7,"结算方式编号及名称不能为空"),
    ReceiverError(18000+8,"收货人信息不能为空"),
    DealerError(18000+9,"客户编号不正确"),
    PostError(18000+10,"该单据已经过账"),
    PostRecordNull(18000+11,"未获取到过账记录"),

    /**
     * 入库操作 19000
     */
    MaterialsIsNotThisBill(19000+1,"零件和单据不匹配，请校验！"),


    /**
     * 入库操作 20000
     */
    AdjustMountTooLess(20000+1,"调整后数量不能小于实际出库数量！"),
    AdjustTypeError(20000+2,"只能调整手动创建的单据！"),
    BillIsFinished(20000+3,"单据已完成，不可以调整！"),
    AllOutBound(20000+4,"全部出库的销售意向单不可以调整数量！"),
    AdjustMountError(20000+5,"调整后数量不能小于已建发货通知单数量！"),
    AdjustMountReturnError(20000+6,"调整后数量不能小于已建退货申请单数量！"),
    AdjustCannotDelete(20000+7,"发货通知单已生成，不能进行删除操作！"),
    AdjustDeleteError(20000+8,"删除失败！"),
    AdjustMountNotOutError(20000+9,"调整后数量不能小于已建三包出库单数量！"),
    AdjustCannotThreeOutDelete(20000+10,"三包出库单已生成，不能进行删除操作！"),
    AdjustQtyNotInError(20000+11,"调整后数量不能小于已建采购入库单数量！"),
    /**
     * 强制完成单据
     */
    CannotFinishBill(21000+1,"只有部分完成的单据才可以强制完成！"),
    FinishBillYet(21000+2,"单据已结单！"),
    NotFinishBill(21000+3,"已保存状态的单据不能结单"),
    /**
     * 查看库存
     * */
    NoAuthority(22000+1,"没有权限查看该供应商"),
    NotPlatform(22000+2,"平台未找到该供应商"),


    /**
     * 微信公众号
     * */
    StoreNotExist(23000+1,"网点信息不存在"),
    GetCoordinateError(23000+2,"获取坐标失败"),

    /**
     * 通知公告
     * */
    AnnouncementTitleIsEmpty(24000+1,"公告标题不能为空！"),
    AnnouncementBodyIsEmpty(24000+2,"公告正文不能为空！"),
    AnnouncementClickIsEmpty(24000+3,"公告连接不能为空！"),
    AnnouncementIdIsEmpty(24000+4,"公告主表ID不能为空！"),
    AttachmentNameIsEmpty(24000+5,"附件名称不能为空！"),
    AttachmentValueIsEmpty(24000+6,"附件值不能为空！"),
    CommentContentIsEmpty(24000+7,"评论内容不能为空！"),

    /**
     * 代理商服务
     * */
    ServiceBasicDataAgentInfoIsExisted(25000+1,"代理商数据字典,当前字典编码已存在！"),
    ServiceBorrowOutInfoStatusIsFalse(25000+2,"只有未出库状态的借用单才可以进行删除操作！"),
    ServiceBorrowOutDetailDeleteFailure(25000+3,"借用单详情信息删除失败！"),
    SubmitStatusNotAllowedModified(25000+4,"提交状态不允许修改"),
    TheUsageQuotaIsGreaterThanCreditLimit(25000+5,"使用额度大于赠送额度"),
    ServicePersonnelDoNotExist(25000+6,"服务人员不存在"),
    ServiceBorrowOutInfoStatusIsFalseReturn(25000+7,"只有未出库状态的借用退回单才可以进行删除操作！"),
    MaintenancePackageAlreadyExists(25000+8,"保养包已存在"),
    SettlementDataRedemptionWhenSettlementSalesReceiptStatement(25000+9,"已结算的销售出库单结单时先将结算数据红冲"),

    SapConnectIsError(26000 + 1, "SAP连接出错"),
    SapCodeIsNull(26000 + 2, "未获取到当前企业SAP编码"),
    /**
     * 结算卡
     * */
    PrepPayRecordNotExist(27000+1,"结算卡记录不存在"),
    PrepPayTotalAmountLessThanZero(27000+2,"结算卡金额抵扣后为负数"),
    PrepPayTotalAmountUpdateFailure(27000+3,"结算卡金额更新失败"),

    /**
     * 采购开票
     */
    MaterialListNotExists(27300 + 1, "申请单必须至少有一种以上零件"), InvoiceNotEnough(27300 + 2, "可开票数量不足"),
    InvoiceApplyNotExist(27300 + 3, "此id申请单不存在"), MaterielNotExist(27300 + 4, "关联零件不存在"),
    alreadyPass(27300 + 5, "申请单已通过审批，无需操作"), statusCodeError(27300 + 6, "申请单审批码错误"),
    suggestionTooLong(27300 + 7, "审核意见过长,请控制在100字内"), ApplyIdisEmpty(27300 + 8, "申请单id不能为空"),
    CannotDeleteCausePassed(27300 + 9, "申请单已通过审核，无法删除"), InvoiceNumError(27300 + 10, "开票数量不能全部为零"),
    SuppierIDNotExist(27300 + 11, "供应商id不存在"), InvoiceIdIsEmpty(27300 + 12, "采购开票申请单id为空"),
    CannotEdit(27300 + 13, "该申请单已通过审批无法编辑"), InvoiceNumNull(27300 + 14, "存在零件开票数量错误或为零"),
    RemarkTooLong(27300 + 14, "备注过长，请控制在100字以内"),
    IsProvisional(27300 + 15, "是暂估价"),
    NotProvisional(27300 + 16, "不是暂估价"),
    NotCy(27300 + 17, "暂估价查询只针对铲运主机厂"),

    /**
     * 退货单
     * */
    OnlyPartInboundCanBeForceFinished(27050+1,"只有部分入库状态的退货单可以强制结单"),
    DraftingStatusDocumentsNotAllowStatements(27050+2,"草拟状态单据不允许结单"),
    ReviewRejectionStatusCannotBeReviewed(27050+3,"审核拒绝状态不允许审核"),


    /**
     * 评分
     * */
    CustomerInfoAlreadyExists(27100+1,"客户信息已存在"),
    CustomerNotRegularAgent(27100+2,"客户不是常规代理商"),
    TheScoreCannotLessThanMinusTen(27100+3,"得分不能小于负十"),
    NumberGenerationFailed(27100+4,"编号生成失败"),
    RankingInfoNotExist(27100+5,"没有需要排名的信息"),
    InfoNotExist(27100+6,"信息不存在"),
    InfoExist(27100+7,"信息已存在"),
    NoRules(27100+8,"规则未制定,请先制定规则！"),
    LocationExistsStockNotAllowDel(27100+9,"该货架编码存在库存，不允许删除!"),
    ShelfInfoDoesNotExist(27100+10,"货架信息不存在!"),
    PleaseMaintainCourierCompanyInfo(27100+11,"请先维护快递公司编码信息"),
    PleaseMaintainLogisticsNo(27100+12,"请先维护物流单号"),
    PleaseMaintainReceiverTel(27100+13,"顺丰快递需维护正确格式的收货人手机号"),

    /**
     * 销售出库单（赠送出库订单）
     */
    SalesOutBillPostStatusError(27200+1,"当前出库状态不能过账"),

    /**
     * 文件上传
     */
    FtpUploadError(28000,"图片上传错误"),

    PackageSpecNotEnough(29000,"包装箱数量不足");

    ;
    private String desc;
    private int code;

    private ErrorCode(int code, String desc)
    {
        this.desc = desc;
        this.code = code;
    }

    public String getDesc()
    {
        return desc;
    }

    public int getCode()
    {
        return code;
    }

    public static ErrorCode getByCode(int code) {
        for (ErrorCode errorCode : ErrorCode.values()) {
            if (errorCode.getCode() == code) {
                return errorCode;
            }
        }
        return null;
    }
}
